package TransactionImplementation

//更改会员事务
//引入类
import (
	"SalaryPayment/AbstractTransaction"
	"SalaryPayment/DataBase"
	"SalaryPayment/Model"
	"SalaryPayment/ModelImplementation"
)

//结构体
type ChangeMemberTransaction struct {
	AbstractTransaction.ChangeAffiliationTransaction
	itsDues     float64
	itsMemberId int
}

//记录会员
func (ch *ChangeMemberTransaction) RecordMembership(employee *Model.Employee) {
	DataBase.PayrollDatabase.AddUnionMember(ch.itsMemberId, employee)
}

//获取联系
func (ch *ChangeMemberTransaction) GetAffiliation() Model.Affiliation {
	//获取联系
	return ModelImplementation.NewUnionAffiliation(ch.itsMemberId, ch.itsDues)
}